Optimal. Leaf size=49 \[ \frac {(a-b) \sec ^2(e+f x)}{2 f}+\frac {a \log (\cos (e+f x))}{f}+\frac {b \sec ^4(e+f x)}{4 f} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.05, antiderivative size = 49, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 3, integrand size = 21, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.143, Rules used = {4138, 446, 76} \[ \frac {(a-b) \sec ^2(e+f x)}{2 f}+\frac {a \log (\cos (e+f x))}{f}+\frac {b \sec ^4(e+f x)}{4 f} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 76
Rule 446
Rule 4138
Rubi steps
\begin {align*} \int \left (a+b \sec ^2(e+f x)\right ) \tan ^3(e+f x) \, dx &=-\frac {\operatorname {Subst}\left (\int \frac {\left (1-x^2\right ) \left (b+a x^2\right )}{x^5} \, dx,x,\cos (e+f x)\right )}{f}\\ &=-\frac {\operatorname {Subst}\left (\int \frac {(1-x) (b+a x)}{x^3} \, dx,x,\cos ^2(e+f x)\right )}{2 f}\\ &=-\frac {\operatorname {Subst}\left (\int \left (\frac {b}{x^3}+\frac {a-b}{x^2}-\frac {a}{x}\right ) \, dx,x,\cos ^2(e+f x)\right )}{2 f}\\ &=\frac {a \log (\cos (e+f x))}{f}+\frac {(a-b) \sec ^2(e+f x)}{2 f}+\frac {b \sec ^4(e+f x)}{4 f}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.08, size = 43, normalized size = 0.88 \[ \frac {a \left (\tan ^2(e+f x)+2 \log (\cos (e+f x))\right )}{2 f}+\frac {b \tan ^4(e+f x)}{4 f} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.54, size = 50, normalized size = 1.02 \[ \frac {4 \, a \cos \left (f x + e\right )^{4} \log \left (-\cos \left (f x + e\right )\right ) + 2 \, {\left (a - b\right )} \cos \left (f x + e\right )^{2} + b}{4 \, f \cos \left (f x + e\right )^{4}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [F(-2)] time = 0.00, size = 0, normalized size = 0.00 \[ \text {Exception raised: NotImplementedError} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.53, size = 50, normalized size = 1.02 \[ \frac {a \left (\tan ^{2}\left (f x +e \right )\right )}{2 f}+\frac {a \ln \left (\cos \left (f x +e \right )\right )}{f}+\frac {b \left (\sin ^{4}\left (f x +e \right )\right )}{4 f \cos \left (f x +e \right )^{4}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.33, size = 64, normalized size = 1.31 \[ \frac {2 \, a \log \left (\sin \left (f x + e\right )^{2} - 1\right ) - \frac {2 \, {\left (a - b\right )} \sin \left (f x + e\right )^{2} - 2 \, a + b}{\sin \left (f x + e\right )^{4} - 2 \, \sin \left (f x + e\right )^{2} + 1}}{4 \, f} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 4.78, size = 46, normalized size = 0.94 \[ \frac {a\,{\mathrm {tan}\left (e+f\,x\right )}^2}{2\,f}-\frac {a\,\ln \left ({\mathrm {tan}\left (e+f\,x\right )}^2+1\right )}{2\,f}+\frac {b\,{\mathrm {tan}\left (e+f\,x\right )}^4}{4\,f} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [A] time = 1.67, size = 80, normalized size = 1.63 \[ \begin {cases} - \frac {a \log {\left (\tan ^{2}{\left (e + f x \right )} + 1 \right )}}{2 f} + \frac {a \tan ^{2}{\left (e + f x \right )}}{2 f} + \frac {b \tan ^{2}{\left (e + f x \right )} \sec ^{2}{\left (e + f x \right )}}{4 f} - \frac {b \sec ^{2}{\left (e + f x \right )}}{4 f} & \text {for}\: f \neq 0 \\x \left (a + b \sec ^{2}{\relax (e )}\right ) \tan ^{3}{\relax (e )} & \text {otherwise} \end {cases} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________